package com.visec.hdy.hadoop.inquiry;

import java.util.Collections;

import com.visec.hdy.hadoop.standard.FSB;
import com.visec.hdy.hadoop.standard.Inquiry;
import com.visec.hdy.hadoop.standard.ReadContext;

public abstract class DefaultInquiryImpl<K, V> implements Inquiry<K, V> {
	protected FSB fsb;
	protected ReadContext context;

	public DefaultInquiryImpl(FSB fsb) {
		this.fsb = fsb;
	}

	@Override
	public void clear() {
		context.setQueryFile(Collections.emptyList());
	}

	@Override
	public void seek(long l) {
		context.skip(l);
	}

	@Override
	public long count() {
		return context.dataCount();
	}

	@Override
	public void setContext(ReadContext context) {
		this.context = context;
	}

	@Override
	public void queryAll() {
		throw new UnsupportedOperationException();
	}

}
